package cn.sylinx.hbatis.ext.starter.pool;

import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;

public class TomcatJdbcDataSourceCreator extends AbstractDataSourceCreator<DataSource> {

	@Override
	DataSource createBaseDataSource(String driver, String url, String username, String password, String dbType) {
		PoolProperties p = new PoolProperties();
		p.setDriverClassName(driver);
		p.setUrl(url);
		p.setUsername(username);
		p.setPassword(password);
		return new DataSource(p);
	}

}
